package com.wedu.view;

import com.wedu.entity.Student;
import com.wedu.service.StudentService;
import com.wedu.service.impl.StudentServiceImpl;
import org.junit.Test;

import java.util.Scanner;

/**
 * @author 乱码酱
 * @date ：2022-09-28 15:37
 * @program: javaUBD
 * @create:
 */
public class Update {
    private StudentService studentService = new StudentServiceImpl();
    private Scanner sc = new Scanner(System.in);
    Student student = new Student();

    //    修改学生信息
    @Test
    public void updateMsg(Student student) {
//        //1.键盘录入想要修改的学生id
//        System.out.println("请输入学生id：");
//        int id = sc.nextInt();
//        //2.调用方法
//        studentService.updateMsg(this.student);
//        Student stu = null;
//        if (stu == null) {
//            System.out.println("没有查询到该学生");
//        } else {
        System.out.println("1.name");
        System.out.println("2.sex");
        System.out.println("3.age");
        System.out.println("4.password");
        System.out.println("5.退出");
        System.out.println("请输入想要修改的内容序号：");
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        switch (line) {
            case "1":
                System.out.println("name:");

                break;
            case "2":
                System.out.println("sex:");
                break;
            case "3":
                System.out.println("age:");
                break;
            case "4":
                System.out.println("password:");
                break;
            case "5":
                System.out.println("您已成功退出，谢谢使用！");
                System.exit(0);  //JVM退出
        }
        //3.输出语句
        //修改成功
        System.out.println("修改成功！");

    }


}
